<!DOCTYPE html>
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
	<head>
		<meta charset="utf-8" />
		<title>v-if与v-show</title>
		<script src="js/vuejs-2.5.16.js"></script>
	</head>
	<body>
		<div id="app">
			<span v-if="flag">大鹏哥</span><br>
			<span v-show="flag">梦圆大小姐</span><br>
			<button v-on:click="toggle">切换显示</button>
			<h1 v-show="ok">Hello</h1>
		</div>
	</body>
	<script>
		//view model
		new Vue({
			el:"#app",
			data:{
				flag:true,
				ok:true
			},
		methods:{
			toggle:function () {
				this.flag = !this.flag;
			}
		}
		})
	</script>
</html>
